//
//  GoodsMoreCollectionViewCell.m
//  wedding
//
//  Created by 常宽 on 15/1/30.
//  Copyright (c) 2015年 常宽. All rights reserved.
//

#import "GoodsMoreCollectionViewCell.h"
#import "GoodsMoreView.h"
#import "TypeModel.h"
@interface GoodsMoreCollectionViewCell ()
@property (nonatomic, retain)GoodsMoreView *view;
@end

@implementation GoodsMoreCollectionViewCell

- (instancetype) initWithFrame:(CGRect)frame
{
    if (self = [super initWithFrame:frame]) {
        self.view = [[GoodsMoreView alloc] initWithFrame:self.contentView.frame];
        [self.contentView addSubview:self.view];
    }
    return self;
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    self.view.frame = self.contentView.bounds;
    __block GoodsMoreCollectionViewCell *cell = self;
    self.view.block = ^(GoodsModel *model){
        cell.block(model);
    };
}
- (void)setModel:(TypeModel *)model
{
    if (_model != model) {
        _model = model;
    }
    self.view.model = model;
//    self.view.text = _model.desc;
//    self.view.text = _model.title;
}

@end
